/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bulkmailer.utils;


import java.util.Map;
import org.apache.log4j.Logger;

/**
 *
 * @author G502497
 */
public final class OsUtils {

    private static String OS = null;

    public static String getOsName() {
        if (OS == null) {
            OS = System.getProperty("os.name");
        }
        return OS;
    }
    public static void getPlatformProperties() {
        Logger.getRootLogger().debug("Platform Properties: ");
        for (Map.Entry<Object, Object> e : System.getProperties().entrySet()) {
            Logger.getRootLogger().debug(e.toString());
        }
    }

    public static boolean isWindows() {
        return getOsName().startsWith("Windows");
    }

    public static boolean isLinux() {        
        return getOsName().startsWith("Linux");
    }
}